<?php

namespace App\Console;

use App\Jobs\Finance\FinanceBillJob;
use App\Jobs\HangJob;
use App\Jobs\PerformanceJob;
use App\Jobs\SendPostCard;
use App\Jobs\SubAccount\SubAccountForgetProcessJob;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\Jobs\SubAccount\SubAccountLoginLogoutRecordJob;

class Kernel extends ConsoleKernel
{
    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        //$schedule->job(new PerformanceJob())->monthlyOn(1, '23:00');
      //  $schedule->job(new PerformanceJob())->everyMinute();
       // $schedule->job(new PerformanceJob())->monthlyOn(1, '23:00');
      //  $schedule->job(new HangJob())->everyMinute();
     //   $schedule->job(new SendPostCard())->everyMinute();

        //处理漏上号漏登记
        $schedule->job(new SubAccountForgetProcessJob())->dailyAt('2:00');

        //生成上号下号记录
        $schedule->job(new SubAccountLoginLogoutRecordJob())->dailyAt('2:10');

        //生成客户账单
        $schedule->job(new FinanceBillJob())->dailyAt('6:00');

    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
